<!--{Atemplate public/tpl/header}-->
<!--{eval echo $this->Ahtml_js_aurl();}-->
<script language="JavaScript" src="{Acan_path_js}/app/danhao.js" type="text/javascript"></script>

<script src="{Acan_path_js}/app/map114n.js" type="text/javascript"></script>
<script>
jQuery(document).ready(function(){
	Acity_ready('province1','city1','dist1',[{$_GET[f1]},{$_GET[f2]},{$_GET[f3]}]);
	Acity_ready('province2','city2','dist2',[{$_GET[s1]},{$_GET[s2]},{$_GET[s3]}]);
});
function kh_chk(id){
	var obj = jQuery('input[value="'+id+'"]');
	if(obj.attr('checked')=='checked'){
		obj.removeAttr('checked');
	}else{
		obj.attr('checked','checked');
	}
}
function kh_all(){
	jQuery('.list_exp input[name="exp[]"]').attr('checked','checked');
}
function kh_buy(){
	var exprr = jQuery('.list_exp').serializeArray();
	if(exprr.length<1){
		Acan.alert('请先选择要购买的快号！',2000);
		return false;
	}
	if(!confirm('确实要购买选中的'+exprr.length+'个快号')){return false;}
	var exp = jQuery('.list_exp').serialize();
	jQuery.ajax({
		type:'post',
		url:'/$this->Amodr-buy',
		data:exp,
		success: function(data){//成功
			Acan.alert(data.msg);
			setTimeout(function(){location.reload();},2000);
		}
	});
}
</script>
<script language="javascript" type="text/javascript" src="{Acan_path_js}/plugin/My97DatePicker/WdatePicker.js"></script>
<div class="Aright">
<div class="_l">
<form id="exp_search" method="get" action="">
	<div class="_p">
		<span>发货时间：</span>
		<input class="Wdate" name="start_date" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH',minDate:'%y-%M-{%d-7} 00',maxDate:'%y-%M-{%d+1} 00'})" value="$_GET[start_date]">
		<span>到：</span>
		<input class="Wdate" name="end_date" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH',minDate:'%y-%M-{%d-7} 00',maxDate:'%y-%M-{%d+2} 00'})" value="$_GET[end_date]">
	</div>
	<div class="_p">
		<span>发货地址：</span>
		<select id="province1" name="f1"></select>
		<select id="city1" name="f2"></select>
		<select id="dist1" name="f3"></select>
	</div>
	<div class="_p">
		<span>收货地址：</span>
		<select id="province2" name="s1"></select>
		<select id="city2" name="s2"></select>
		<select id="dist2" name="s3"></select>
	</div>
	<div class="_p">
		<span>快递类型：</span>
		<select name="com">
			<!--{loop $this->enum[com] $key $val}-->
			<option value="$key" {if $key==$_GET[com]}selected="selected"{/if}>$val</option>
			<!--{/loop}-->
		</select>
		<span>是否扫描：</span>
		<select name="scan">
			<!--{loop $this->enum[scanrr] $key $val}-->
			<option value="$key" {if $key==$_GET[scan]}selected="selected"{/if}>$val</option>
			<!--{/loop}-->
		</select>
		<span>单号：</span>
		<input type="text" name="exp" value="$_GET[exp]">
		{if $this->danhao_sale_fun==1}
		<span>发布人：</span>
		<input type="text" name="username">
		{/if}
	</div>
	<div class="">
		<div class="_p">
			<button class="_btn" type="submit">提交查询</button>
			<div class="alert-error" id="result" style="display:none;"></div>
		</div>
	</div>
</form>
</div>

<div class="_l -f_l">
	<div class="list_nav">
		{if $this->_SS[uid]>0}
		<div class="-f_r">
		<div class="_page -f_l">$pages->html</div>
		<input type="button" class="_btn" value="全选" onclick="kh_all()"/>
		<input type="button" class="_btn" value="购买" onclick="kh_buy()"/>
		</div>
		{/if}
	</div>
	<form class="list_exp">
	<table class="-table -f_l">
		<tr>
		<!--{loop $column $key $val}-->
			<th><b><a href="$page->theurl-aorder-$key,$pages->neworder$pages->other">$val</a></b></th>
		<!--{/loop}-->
			{if $this->_SS[uid]==1}
			<th><b>管理</b></th>
			{/if}
		</tr>
		<!--{eval $i=0;}-->
		<!--{loop $list $key $val}-->
		<!--{eval $i++;}-->
		<tr>
			<!--{eval echo $obj->for_html($key,$val,$column,$this->model,'Aform');}-->
			<td>
				<input type="button" class="_btn" onclick="kh_find($val[id])" value="查看单号"/>
				<input type="button" class="_btn" value="删除" onClick="javascript:if(confirm('确实要删除吗?')) location.href='$this->Amodr-del-$val[id]';" />
			</td>
		</tr>
		<!--{/loop}-->
	</table>
	</form>
	{if $this->_SS[uid]>0}
	<div class="_page">$pages->html</div>
	{/if}
</div>

</div>
<!--{Atemplate public/tpl/footer}-->